<div class="col-md-12 col-sm-12 col-xs-12">
    <?php $form = $this->beginWidget('CActiveForm', array(
            'id'            => 'images-form',
            'enableClientValidation' => true,
            'enableAjaxValidation'   => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
            ),
            'htmlOptions'   => array(
                'class'   => 'form-horizontal',
            )
        )
    ); ?>
    <div class="form-group clearfix">
        <?php echo $form->labelEx($model, 'album_id', array('class' => 'col-md-3 col-sm-3 control-label')); ?>
        <div class="col-md-6 col-sm-6">
            <?php echo $form->dropDownList($model, 'album_id', CHtml::listData(Albums::model()->findAll('status=:status', array(':status' => 1)), 'id', 'title')); ?>
        </div>
        <?php echo $form->error($model, 'album_id'); ?>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model, 'image_url', array('class' => 'col-md-3 col-sm-3 control-label')); ?>
        <div class="col-md-6 col-sm-6">
            <?php echo $form->textField($model, 'image_url', array('class' => 'form-control')); ?>
        </div>
        <?php echo $form->error($model, 'image_url'); ?>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model, 'image_alt', array('class' => 'col-md-3 col-sm-3 control-label')); ?>
        <div class="col-md-6 col-sm-6">
            <?php echo $form->textField($model, 'image_alt', array('class' => 'form-control')); ?>
        </div>
        <?php echo $form->error($model, 'image_alt'); ?>
    </div>
    <div class="form-group">
        <?php echo $form->labelEx($model, 'status', array('class' => 'col-md-3 col-sm-3 control-label')); ?>
        <div class="col-md-6 col-sm-6">
            <?php echo $form->dropDownList($model, 'status', Lookup::items('STATUS')); ?>
        </div>
    </div>
    <div class="col-sm-6 col-sm-offset-3">
        <div class="pull-right">
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Tạo mới' : 'Sửa', array('class' => 'btn btn-primary m-b-10')); ?>
            <?php echo CHtml::resetButton('Nhập lại', array('class' => 'btn btn-default m-b-10')); ?>
        </div>
    </div>
    <?php $this->endWidget(); ?>
</div>